Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Rewrite #120

Open
wants to merge 154 commits into
base: master
Choose a base branch
from
Open

Rewrite #120

wants to merge 154 commits into from

Conversation

RealOrangeOne
Copy link
Owner

@RealOrangeOne RealOrangeOne commented Dec 10, 2016

  • Remove old code
  • Build Haste Map
  • Add mocks for native modules
  • Add component mocks
  • Add extra require definitions
  • Add unit tests for mocking
  • Increase coverage
  • Basic tests for react-native core components
  • Basic tests for react-native core APIs

Lasted Checked Version: 0.42

@RealOrangeOne RealOrangeOne added this to the Version 1.0 milestone Dec 12, 2016
Jason Ma added 4 commits November 5, 2017 13:09
- remove unnecessary assertion because it's asserted implicitly in the next assertion
@jasonfma
Copy link
Collaborator

jasonfma commented Nov 5, 2017

@RealOrangeOne opened a PR into your rewrite branch #151

Jason Ma added 7 commits November 5, 2017 13:19
- render of `ProgressBarAndroid` changed from `ActivityIndicator` in RN 0.49 back to  `AndroidProgressBar` in RN 0.50

Signed-off-by: Jason Ma <[email protected]>
Signed-off-by: Jason Ma <[email protected]>
Jason Ma added 2 commits January 6, 2018 11:29
- Update readme to reference Node 6 support
- Update travis to include Node 8.0.0 tests
@jasonfma jasonfma mentioned this pull request Jan 16, 2018
src/haste.js Outdated
var files = glob.sync(path.join(PROJECT_NODE_MODULES, '**/*.js'));

_.forEach(files, function (file) {
var matches = providesRegex.exec(fs.readFileSync(file).toString());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran into an issue here where if the package name ends with .js (example) it will cause the install script to fail. So my workaround was to check if the file is a actual file first. Additionally I changed the wildcard above to */**/*.js.

@nick-rex
Copy link

Hi there, what is required to get this over the line? Happy to help if it is of any use

…nto rewrite

# Conflicts:
#	src/components/View.js
#	src/propTypes/LayoutPropTypes.js
#	src/react-native.js
@jasonfma
Copy link
Collaborator

jasonfma commented Feb 6, 2018

I think the core APIs that need to be tested are as follows:

  • AccessibilityInfo
  • ActionSheetIOS
  • Animated
  • LayoutAnimation
  • ListViewDataSource
  • NetInfo
  • PanResponder
  • PermissionsAndroid
  • PixelRatio
  • PushNotificationIOS
  • Settings
  • Share
  • StatusBarIOS
  • Systrace
  • TimePickerAndroid
  • ToastAndroid
  • Transforms
  • Vibration
  • VibrationIOS

@jasonfma
Copy link
Collaborator

jasonfma commented Feb 6, 2018

I believe the way that RN is doing it with jest is a good guideline of how to get these APIs working.
https://github.com/facebook/react-native/blob/master/jest/setup.js

@RealOrangeOne
Copy link
Owner Author

Theoretically, it should be a simple case of stubbing out the native modules related to those APIs, and possibly make them return sane values if required. I'm hoping none of them require a full stub

@ckurban
Copy link

ckurban commented Feb 14, 2018

Whats the ETA for this?

Copy link

@nijolas nijolas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the broken test about? "Cannot find module 'react-native/package'" on npm install is the error. Anything to do with this issue by any chance? oblador/react-native-vector-icons#626 (comment)

Edit: I completely misunderstood that error - please see #161 for a proposed fix from me

Copy link

@nijolas nijolas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please incorporate #161 to fix Circle CI tests

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants